const { defineConfig } = require('@vue/cli-service')
const path = require("path");
module.exports = defineConfig({
  transpileDependencies: false,
  devServer:{
    open:false,
    port:8888,
    //代理
    proxy:{
      '/dev-api1':{
        target:'http://gmall-h5-api.atguigu.cn/',
        changeOrigin:true,
        pathRewrite:{
          "^/dev-api1":""
        }
      }
    }
  },
  //此配置项的值如果是一个对象,则会通过webpack-merge合并到最终的配置中
  configureWebpack:{
    resolve:{
      alias:{
        "@": path.resolve(__dirname,"./src"),
        "@comp":"@/components",
        "@api":"@/api"
      }
    }
  }
})
